package com.logic.landseaserver.persistence.read;

import java.util.List;

import com.logic.common.util.QueryUtil;
import com.logic.landseaserver.domain.AccountBalance;
import com.logic.landseaserver.domain.Contract;
import com.logic.landseaserver.models.prepayment.bean.AccountBalanceResp;

public interface AccountBalanceReadMapper {

    AccountBalance selectByPrimaryKey(Integer id);

    AccountBalance selectByAccountIdAndType(AccountBalance accountBalance);
    
    List<AccountBalanceResp> selectByAccountId(Integer accountId);

    List<AccountBalanceResp> selectListByAccountId(QueryUtil queryUtil);

    /**
     * 
     * [简要描述]：根据账户ID查询账户总余额</br>
     * [详细描述]：</br>
     * [作者]：Aaron(2017-12-07)</br>
     *
     * @param accountId
     * @return
     *
     */
    Double getTotalMoneyByAccountId(Integer accountId);
    
    /**
     * 
     * [简要描述]：根据合同查询该合同下余额</br>
     * [详细描述]：</br>
     * [作者]：Aaron(2017-12-08)</br>
     *
     * @param contract
     * @return
     *
     */
    List<AccountBalance> selectListByContract(Contract contract);
    
    /**
     * 
     * [简要描述]：根据账户查询余额列表</br>
     * [详细描述]：已过滤到了删除态的</br>
     * [作者]：Aaron(2017-12-11)</br>
     *
     * @param accountId
     * @return
     *
     */
    List<AccountBalance> selectBalanceByAccountId(Integer accountId);
}